#ifndef ITHREADAFFINITY_H
#define ITHREADAFFINITY_H

#include <QSet>

/**
 * @brief The IThreadAffinity class
 * 线程亲和性设置接口
 */
class IThreadAffinity
{
public:
    virtual ~IThreadAffinity() {}

    /**
     * @brief setAffinity
     * 设置线程亲和性
     * @param threadId 线程id
     * @param processorIndexs 逻辑core序号列表，从0开始
     * @return 设置结果
     */
    virtual bool setAffinity(quint64 threadId, const QSet<int>& processorIndexs) = 0;
};

#endif // ITHREADAFFINITY_H
